<?php

/**
 * @author christian
 * @copyright 2011
 * @abstract carga de todo el itinerario que es parte de un tour del itenario del tour
 */
 


$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";
include_once("$ruta/conf/CConfig.php");
include_once("$ruta/elements/head.tpl");
include_once("$ruta/MDTourGeneral/CTourTableDraw.php");
include_once("$ruta/MDTourGeneral/CDrawPageReg.php");
include_once("CRestaurantesTable.php");
include_once("$ruta/star.php");
include_once("$ruta/view/CDrawMenuTour.php");

$items=array("Nuevo Tour"=>"CSmallDefinePack.php","Nuevo paquete"=>"CTourEdit.php?codigo=159&default=2","Ver paquetes"=>"/viventura/MDTour/","Otra"=>"g");

CDrawMenuTour::getInstance()->setMenu($items);
CDrawMenuTour::getInstance()->rigth_side_begin();//empieza lado derecho 
CDrawMenuTour::getInstance()->DrawDivAdBegin("content_area_user_title","1");echo "<h1>Destino Sur</h1>";
CDrawMenuTour::getInstance()->DrawDivAdEnd();



$title="Restaurantes";
$maintable="restaurant"; 
$growtable="pack_has_tour";


if (!isset($_POST['updated'])) {$_POST['updated'] = "NULL"; }
$updated = $_POST['updated'];
if($updated!="NULL"){echo "El paquete $updated fue actualizado";}
else{echo "";}

$columnas=array("idRest"=>"Id","NomRes"=>"Nombre","TypRes"=>"Tipo","DirRes"=>"Dirección","TelRes"=>"Telefono","MovRes"=>"Teléfono móvil","WebSitRes"=>"Sitio Web");
    //CTourTableDraw::getInstance()->DrawTable($title,$maintable,$columnas);
CRestaurantesTable::getInstance()->DrawTable($title,$maintable,$growtable,$columnas);

echo "<p align='right'>";
CDrawPageReg::getInstance()->DrawButton("Añadir servicio", "CRestauranteServicio.php");
echo "</p>";
/////////////////Area de registro /////////////////////
CDrawPageReg::getInstance()->DrawHideSectionBeg();
    
    echo "<p align='center'>";
    $action="CRegistroRestaurantes.php?default=1";$name="formulario_registro";$method="post";$NAME="Registro de paquete turístico";
    CDrawPageReg::getInstance()->DrawHead($action,$name,$method,$NAME);
    echo "</p>";
    CDrawPageReg::getInstance()->readOnly("restaurant","idRest");
    
    echo "<h2>Operador</h2>";
    echo "<div id='dashboard_info'>";

    $campos = array("idOpe"=>"idOpe", "NamOpe"=>"NamOpe");
    CDrawPageReg::getInstance()->DrawSelect("operador", $campos, "Asignar a operador","idOpe");

    echo "</div>";

  
    $val_restaurantes = array (":required","",":required",":url","");
    $restaurantes=array("NomRes"=>"Nombre","TypRes"=>"Tipo","DirRes"=>"Dirección","WebSitRes"=>"Sitio Web","PostCodRes"=>"Código Postal");
    CDrawPageReg::getInstance()->DrawTextBox($restaurantes,$val_restaurantes);
    

    $val_crestaurantes = array (":required",":required");
    $crestaurantes=array("FirstConRes"=>"Nombre del contacto","LastConRes"=>"Apellidos del contacto");
    CDrawPageReg::getInstance()->DrawTextBox($crestaurantes,$val_crestaurantes);
    
    
    $val_trestaurantes = array (":integer",":integer",":integer",":integer");
    $trestaurantes=array("TelRes"=>"Telefono","FaxRes"=>"Fax","MovRes"=>"Móvil");
    CDrawPageReg::getInstance()->DrawTextBox($trestaurantes,$val_trestaurantes);
    
    
      
    echo "<p align='right'>";
    CDrawPageReg::getInstance()->DrawSubmmit("Añadir");
    echo "</p>";
    echo "</div>";

CDrawPageReg::getInstance()->DrawHideSectionEnd("Añadir restaurante / Ocultar");

////////////Fin del area de registro////////////////
?>